package com.wf.classRoomTest.server;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class TCPServer {
    public static void main(String[] args) {

        try (ServerSocket serverSocket = new ServerSocket(8090);

             Socket accept = serverSocket.accept();
             BufferedReader reader = new BufferedReader(new InputStreamReader(accept.getInputStream()))


        ) {

            System.out.println(reader.readLine());


        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

